home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / wdj0797.zip / ZOLMAN.ZIP / MYSPLI~3.CPP < prev    next >
C/C++ Source or Header  |  1996-11-18  |  4KB  |  144 lines

  1. // MySplitter.cpp : Defines the class behaviors for the application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "MySplitter.h"
  6.  
  7. #include "MainFrm.h"
  8. #include "MySplitterDoc.h"
  9. #include "MySplitterView.h"
  10.  
  11. #ifdef _DEBUG
  12. #define new DEBUG_NEW
  13. #undef THIS_FILE
  14. static char THIS_FILE[] = __FILE__;
  15. #endif
  16.  
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CMySplitterApp
  19.  
  20. BEGIN_MESSAGE_MAP(CMySplitterApp, CWinApp)
  21.     //{{AFX_MSG_MAP(CMySplitterApp)
  22.     ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
  23.         // NOTE - the ClassWizard will add and remove mapping macros here.
  24.         //    DO NOT EDIT what you see in these blocks of generated code!
  25.     //}}AFX_MSG_MAP
  26.     // Standard file based document commands
  27.     ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
  28.     ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
  29.     // Standard print setup command
  30.     ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
  31. END_MESSAGE_MAP()
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CMySplitterApp construction
  35.  
  36. CMySplitterApp::CMySplitterApp()
  37. {
  38.     // TODO: add construction code here,
  39.     // Place all significant initialization in InitInstance
  40. }
  41.  
  42. /////////////////////////////////////////////////////////////////////////////
  43. // The one and only CMySplitterApp object
  44.  
  45. CMySplitterApp theApp;
  46.  
  47. /////////////////////////////////////////////////////////////////////////////
  48. // CMySplitterApp initialization
  49.  
  50. BOOL CMySplitterApp::InitInstance()
  51. {
  52.     AfxEnableControlContainer();
  53.  
  54.     // Standard initialization
  55.     // If you are not using these features and wish to reduce the size
  56.     //  of your final executable, you should remove from the following
  57.     //  the specific initialization routines you do not need.
  58.  
  59. #ifdef _AFXDLL
  60.     Enable3dControls();            // Call this when using MFC in a shared DLL
  61. #else
  62.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  63. #endif
  64.  
  65.     LoadStdProfileSettings();  // Load standard INI file options (including MRU)
  66.  
  67.     // Register the application's document templates.  Document templates
  68.     //  serve as the connection between documents, frame windows and views.
  69. //#$-NOTE:Step 2-$#
  70.     CSingleDocTemplate* pDocTemplate;
  71.     pDocTemplate = new CSingleDocTemplate(
  72.         IDR_MAINFRAME,
  73.         RUNTIME_CLASS(CMySplitterDoc),
  74.         RUNTIME_CLASS(CMainFrame),       // main SDI frame window
  75.         NULL);
  76.     AddDocTemplate(pDocTemplate);
  77.  
  78.     // Parse command line for standard shell commands, DDE, file open
  79.     CCommandLineInfo cmdInfo;
  80.     ParseCommandLine(cmdInfo);
  81.  
  82.     // Dispatch commands specified on the command line
  83.     if (!ProcessShellCommand(cmdInfo))
  84.         return FALSE;
  85.  
  86.     return TRUE;
  87. }
  88.  
  89. /////////////////////////////////////////////////////////////////////////////
  90. // CAboutDlg dialog used for App About
  91.  
  92. class CAboutDlg : public CDialog
  93. {
  94. public:
  95.     CAboutDlg();
  96.  
  97. // Dialog Data
  98.     //{{AFX_DATA(CAboutDlg)
  99.     enum { IDD = IDD_ABOUTBOX };
  100.     //}}AFX_DATA
  101.  
  102.     // ClassWizard generated virtual function overrides
  103.     //{{AFX_VIRTUAL(CAboutDlg)
  104.     protected:
  105.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  106.     //}}AFX_VIRTUAL
  107.  
  108. // Implementation
  109. protected:
  110.     //{{AFX_MSG(CAboutDlg)
  111.         // No message handlers
  112.     //}}AFX_MSG
  113.     DECLARE_MESSAGE_MAP()
  114. };
  115.  
  116. CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
  117. {
  118.     //{{AFX_DATA_INIT(CAboutDlg)
  119.     //}}AFX_DATA_INIT
  120. }
  121.  
  122. void CAboutDlg::DoDataExchange(CDataExchange* pDX)
  123. {
  124.     CDialog::DoDataExchange(pDX);
  125.     //{{AFX_DATA_MAP(CAboutDlg)
  126.     //}}AFX_DATA_MAP
  127. }
  128.  
  129. BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
  130.     //{{AFX_MSG_MAP(CAboutDlg)
  131.         // No message handlers
  132.     //}}AFX_MSG_MAP
  133. END_MESSAGE_MAP()
  134.  
  135. // App command to run the dialog
  136. void CMySplitterApp::OnAppAbout()
  137. {
  138.     CAboutDlg aboutDlg;
  139.     aboutDlg.DoModal();
  140. }
  141.  
  142. /////////////////////////////////////////////////////////////////////////////
  143. // CMySplitterApp commands
  144.